// src/api/room.js
import request from "@/utils/request";

export function getRoomList(params: any) {
    return request({
        url: `/api/classroom/list`,
        method: 'get',
        params: params
    });
}

export function getRoomById(id: any) {
    return request({
        url: `/api/classroom/getClassroomInfo/${id}`,
        method: 'get',
    });
}

export function addRoom(data: any) {
    return request({
        url: `/api/classroom/createClassroom`,
        method: 'post',
        data: data
    });
}

export function updateRoom(data:any) {
    return request({
        url: `/api/classroom/updateClassroomInfo`,
        method: 'put',
        data: data
    });
}

export function deleteRoom(id: any) {
    return request({
        url: `/api/classroom/${id}`,
        method: 'delete',
    });
}
